/*
 * login_json
 */
var login_json = null;
function findLogin() {
	var xhr = false;
	xhr = new XMLHttpRequest();
	xhr.onreadystatechange = function() {
		var message;
		if (xhr.readyState == 4) {
			if (xhr.status == 200) {

				login_json = JSON.parse(xhr.responseText);

				if (login_json != 2) {
					roleControl();
					toastr.success("欢迎登陆" + login_json.user_account + "，身份："
							+ login_json.user_type, "操作成功");
				} else {
					toastr.error("登录失效，请重新登录", "操作失败");
					window.location = "/jxfgyj/login.jsp";
				}

			} else {
				// toastr.error(xhr.status);
			}
		}
	}
	var formData = new FormData();
	xhr.open("POST", "/jxfgyj/user/findLogin");
	xhr.send(formData);
}